/**
 * Project Name:kany-utils
 * File Name:QuartzJobFactoryDisallowConcurrentExecution.java
 * Package Name:me.kany.utils.springutils.task.factory
 * Date:2016年9月20日下午10:28:09
 * Copyright (c) 2016, Jason.Wang All Rights Reserved.
 */
package me.kany.utils.springutils.task.factory;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import me.kany.utils.springutils.task.TaskUtils;
import me.kany.utils.springutils.task.model.ScheduleJob;

/**
 * ClassName:QuartzJobFactoryDisallowConcurrentExecution<br/>
 * Function: 定义任务调度的工厂<br/>
 * Date:2016年9月14日下午12:05:16<br/>
 * 
 * @author Jason.Wang
 * @version 1.0
 * @since JDK1.7
 * @see
 */
public class QuartzJobFactoryDisallowConcurrentExecution implements Job {

	/* (non-Javadoc)
	 * @see org.quartz.Job#execute(org.quartz.JobExecutionContext)
	 */
	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {
		ScheduleJob scheduleJob = (ScheduleJob) context.getMergedJobDataMap().get("scheduleJob");
		TaskUtils.invokMethod(scheduleJob);
	}
}
